home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -websites- / wirenet / files / thor26_main.lha / THOR_2.6 / UpdateThor < prev    next >
Text File  |  1999-02-19  |  44KB  |  1,521 lines

  1. ; $Id: UpdateThor 1.8 1997/09/16 12:22:02 pettern Exp $
  2. ;*************************************************************************
  3. ;    Title:
  4. ;        UpdateThor
  5. ;*************************************************************************
  6. ;    Description:
  7. ;        Commodore Installer Script for the Thor 2.5 software
  8. ;*************************************************************************
  9. ;    Authors:
  10. ;       Petter Nilsen
  11. ;          - intro borrowed from Robert Reiswig's CyberGfx installer
  12. ;       
  13. ;*************************************************************************
  14. ;    Still to do:
  15. ;        - THOR.macros might not be correct. Notify user?
  16. ;        - Handle previous installations with one of the env-vars/assigns
  17. ;          missing.
  18. ;       - Not delete catalogs/, only the needed dirs
  19. ;
  20. ;*************************************************************************
  21. ;
  22. ;******************************************************
  23. ;***** SET UP OUR VARIABLES AND OTHER SUCH STUFF ******
  24. ;******************************************************
  25.  
  26. ; some useful variables
  27.     (set 
  28.         true             1
  29.         false             0
  30.         yes             true
  31.         no                 false
  32.         is_a_file         1
  33.         is_a_dir         2
  34.         quote             "\""
  35.         newline         "\n"
  36.         tick             "'"
  37.         nothing         ""
  38.         bbspack         0
  39.         inetpack         0
  40.         #inetpackname     "thor26_inet.lha"
  41.         #bbspackname     "thor26_bbs.lha"
  42.         #arexxpackname     "thor26_arexx.lha"
  43.         #docspackname     "thor26_docs.lha"
  44.         #version        "THOR 2.6"
  45.         tcptype         0
  46.         uucptype         0
  47.         cpu             (database "cpu")
  48.         cpu020             (and (<> cpu "68000") (<> cpu "68010"))
  49.         v39             (>= (/ (getversion "exec.library" (resident)) 65536) 39)
  50.         #endtext        (cat "Hope you like THOR! Do not hesitate to "
  51.                             "send us comments, bugreports and suggestions.\n\n"
  52.                             "Check out http://www.thule.no/ for updates and news, "
  53.                             "and consider subscribing to one of the mailing lists for "
  54.                             "THOR that are operational. See the readme file included "
  55.                             "with this distribution for details."
  56.                         )
  57.     )
  58.  
  59. ; set up our delete options
  60.     (delopts "AskUser" "OkNoDelete" "Force")
  61.  
  62. ; some useful procedures
  63.     ; change userlevel to expert
  64.     (procedure expert_level
  65.         (
  66.             (user 2)
  67.         )
  68.     )
  69.  
  70. ; reset userlevel back to default
  71.     (procedure default_level
  72.         (
  73.             (user default-level)
  74.         )
  75.     )
  76.  
  77. ; store off userlevel
  78.     (procedure save_default_level
  79.         (
  80.             (set default-level @user-level)
  81.         )
  82.     )
  83.  
  84. ; some overused strings
  85. (set omp (cat "One moment please..." newline))
  86.  
  87. ; ---------------------------------------------------------------------------
  88. (set #classact "\n\n\nThe following is the default Install/Update Installer\n\nProcedure for placing ClassAct on your System.")
  89.  
  90. ;********************************************************************
  91. ; ClassAct Install/Update Default Procedure by:
  92. ; Osma Ahvenlampi - Osma.Ahvenlampi@hut.fi
  93. ;********************************************************************
  94. ; I have disabled the (complete) settings
  95. (working #classact)
  96. ; ************* PLEASE COPY THIS PROCEDURE ALONG WITH THE STRINGS IT USES 
  97. ; ************* TO THE INSTALLER SCRIPT OF YOUR CLASSACT APPLICATION.
  98. ; ************* IT WILL TAKE CARE OF INSTALLING THE CLASSACT CLASSES YOU
  99. ; ************* PROVIDED WITH YOUR APPLICATION TO THE USER'S SYSTEM.
  100.  
  101. ; $VER: ClassAct_Install 1.10 (21.1.97) by Osma Ahvenlampi
  102.  
  103. (set cpu (database "cpu"))
  104. (set cpu020 (and (<> cpu "68000") (<> cpu "68010")))
  105. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  106.  
  107. ; percentage of the size of included ClassAct classes versus the whole
  108. ; distribution (ie. total "complete" percentage after ClassAct is installed)
  109. (set classact-complete 50)
  110.  
  111. ; ClassAct installer scripts
  112. (if (= @language "español")
  113. ; SPANISH CLASSACT INSTALLATION STRINGS
  114. (
  115. (set #classdest-prompt "Por favor, seleccione el directorio donde desea instalar las clases de ClassAct.\n(Vea la ayuda para más detalles)")
  116. (set #classdest-help (cat "ClassAct es un kit de interface gráfica consistente es clases compartidas BOOPSI.\n\nAlgunos programas requieren que algunas o todas de las clases de ClassAct estén instaladas en su sistema. "
  117.     (if v39 (cat "El OS 3.0 tiene un directorio estándar para las clases BOOPSI: el directorio SYS:Classes. Se recomienda que instale ClassAct ahí.")
  118.             (cat "El OS 2.0 no tiene un sitio estándar para las clases BOOPSI residentes en disco. En el OS 3.0 esas clases son almacenadas en el directorio SYS:Classes. Se recomienda que cree este directorio e instale ClassAct ahí.\nEste directorio debe ser añadido a la asignación de LIBS:. Esto puede ser hecho colocando el comando\nAssign >NIL: LIBS: SYS:Classes ADD\nal User-Startup. Este instalador lo hará por usted.")
  119.         )
  120.     )
  121. )
  122. (set #classes-020 "¿Quiere usar la versión optimizada para OS 3.0 y 020 de ClassAct?")
  123. (set #help-020 "Algunas librerías de ClassAct tienen versiones optimizadas para el uso en máquinas con OS 3.0 y 020 o superior. Si su Amiga es una de tales máquinas debería instalar estas. Las versiones 68000/2.0 también funcionarán, pero son ligeramente más lentas")
  124. (set #noclasses-message "El subdirectorio que seleccionó para sus clases ClassAct no forma parte de la asignación de LIBS:.\n\nEs necesario añadir esta asignación para que las clases puedan ser localizadas adecuadamente.")
  125. (set #creating-dir "Creando directorio ")
  126. (set #usbackup-prompt "Ahora se hará una copia de seguridad del User-Startup.")
  127. (set #usbackup-help "Este instalador hará ahora una modificación en el User-Startup. Antes de hacer esto se hará una copia de seguridad del User-Startup en S:User-Startup.old")
  128. (set #adding-1 "Añadiendo ")
  129. (set #adding-2 "a la asignación de LIBS:\n")
  130. (set #adding-help "Esto es necesario para que las clases puedan ser encontradas.")
  131. (set #junod-button "Parece que tiene el último button.gadget de Comodore ('V42') instalado en su sistema.\n\nEl button.gadget de ClassAct es superior a este gadget y le recomendamos que lo remplace. El button.gadget de ClassAct es compatible con el de Commodore. ¿Desea hacer una copia de seguridad del gadget de Commodore y remplazarlo por la versión de ClassAct?")
  132. (set #junod-backed "Se ha hecho una copia de seguridad del button.gadget 'V42' de Commodore con el nombre button.gadget.v42.\n\nEl button.gadget de ClassAct será instalado en su lugar.")
  133. (set #junod-kept "El button.gadget 'V42' de Commodore no fué remplazado con la versión superior de ClassAct.\n\nLos programas que dependan de la disponibilidad de las características de la versión de ClassAct funcionarán mal probablemente")
  134. ;(set #caprefs-message "CAPrefs es una pequeña utilidad que inicializa algunas preferencias del usuario para las aplicaciones ClassAct. Estas incluyen el estilo de resaltado (Fino/GadTools/Xen), relleno de ventanas, y detalles de las etiquetas de grupo.\n\nPor favor, use las preferencias de interface de ClassAct en su cajón de sistema 'Prefs' .\n\n")
  135. (set #caprefs-message "ClasAct tiene varios aspectos configurables por el usuario que afectan a la apariencia de las interfaces ClassAct.\n\nEstos ajustes pueden ser modificados usando la herramienta de preferencias de ClassAct que será instalada en su cajón 'Prefs'.\n\nUna pequeña herramienta, CAPrefs, será añadida a su user-startup para cargar los ajustes al arrancar.")
  136. (set #caprefs-startup-1 "Añadiendo el comando\n\n")
  137. (set #caprefs-startup-2 "\n\nA su s:User-Startup.")
  138. (set #decompressing-classact "Distribución de Classact comprimida detectada\n\nDescomprimiendo a RAM:")
  139. (set #deleteing-cltmp "Borrando ficheros temporales")
  140. )
  141. ; ENGLISH CLASSACT INSTALLATION STRINGS
  142. (
  143. (set #classdest-prompt "Please select the directory where you want the ClassAct classes installed.\n(See help for details)")
  144. (set #classdest-help (cat "ClassAct is a GUI toolkit consisting of shared BOOPSI classes.\n\nSome programs require some or all of the ClassAct classes installed on your system. "
  145.     (if v39 (cat "OS 3.0 has a standard directory for BOOPSI classes, the SYS:Classes directory. It is recommended that you install ClassAct there.")
  146.             (cat "OS 2.0 does not have a standard place for disk resident BOOPSI classes. On OS 3.0 these classes are stored in the SYS:Classes directory. It is recommended that you create this directory and install ClassAct there.\nThis directory must be added in the LIBS: assign. This can be done by placing the command\nAssign >NIL: LIBS: SYS:Classes ADD\nto User-Startup. This installer will do this for you.")
  147.         )
  148.     )
  149. )
  150. (set #classes-020 "Do you want to use the OS 3.0, 020 optimised version of ClassAct?")
  151. (set #help-020 "Some ClassAct libraries have versions optimised for use on 020 or better equipped OS 3.0 or later machines. If your Amiga is such equipped, you should install these. The 68000/2.0 versions will also work, but are slightly slower.")
  152. (set #noclasses-message "The directory you selected for your ClassAct classes is not a part of the LIBS: assign.\n\nIt is necessary to add this assign so that the classes will be found properly.")
  153. (set #creating-dir "Creating directory ")
  154. (set #usbackup-prompt "User-Startup will now be backed up.")
  155. (set #usbackup-help "This installer will next make a modification in User-Startup. Before doing this the old User-Startup will be backed up to S:User-Startup.old")
  156. (set #adding-1 "Adding ")
  157. (set #adding-2 " to LIBS: assign\n")
  158. (set #adding-help "This is necessary so that the custom classes can be found.")
  159. (set #junod-button "It seems you have a late Commodore 'V42' button.gadget installed on your system.\n\nClassAct's button.gadget is far more capable than this gadget, and we recommend that you replace it. The ClassAct button.gadget is backwards compatible to the Commodore gadget. Do you wish to back up the Commodore gadget and replace it with the ClassAct version?")
  160. (set #junod-backed "The Commodore 'V42' button.gadget has been backed up with the name button.gadget.v42.\n\nThe ClassAct button.gadget will be installed in its place.")
  161. (set #junod-kept "The Commodore 'V42' button.gadget was not replaced with the more capable ClassAct version.\n\nPrograms depending on the availability of ClassAct-only features will be likely to work wrong.")
  162. ;(set #caprefs-message "CAPrefs is a small utility that sets some user preferences for ClassAct applications. These include the bevel style (Thin/Gadtools/Xen), window backfills, and group label details.\n\nPlease use the ClassAct GUI prefs editor to alter the default settings provided. ClassAct prefs will be installed in your system Prefs drawer.\n\n")
  163. (set #caprefs-message "ClassAct has several user-configurable aspects that affect the look of ClassAct interfaces.\n\nThese settings can be changed using the ClassAct preferences tool that will be installed in yout Prefs drawer.\n\nA small tool, CAPrefs, will be added to your user-startup to load the settings on reboot.")
  164. (set #caprefs-startup-1 "Adding the command\n\n")
  165. (set #caprefs-startup-2 "\n\nTo your s:User-Startup.")
  166. (set #decompressing-classact "Compressed ClassAct distribution detected\n\nDecompressing to RAM:")
  167. (set #deleting-cltmp "Deleting temporary files")
  168. )
  169. )
  170.  
  171. (procedure install-classact
  172. ; call this procedure to copy the classes included in the Classes directory
  173. ; in your distribution dir.
  174.     (if (exists "ClassAct.lha")    ; ClassAct is compressed - need to decompress first
  175.         (                        ; Distribution includes LHEX
  176.             (working (cat #decompressing-classact))
  177. ; ClassAct.lha contains paths/files "Classes/*", "C/CheckAssign", "Prefs/CAPrefs" and "Prefs/ClassAct"
  178.             (run "lhex -aqfw=ram:ClassAct/ x ClassAct.lha")
  179.             (set @classact-source "RAM:ClassAct")
  180.         )
  181.         (set @classact-source (pathonly @icon))
  182.     )
  183.     (if (exists "ClassAct.lzx")    ; ClassAct is compressed - need to decompress first
  184.         (                        ; Distribution includes UNLZX
  185.             (working (cat #decompressing-classact))
  186. ; ClassAct.lzx contains paths/files "Classes/*", "C/CheckAssign",  "Prefs/CAPrefs" and "Prefs/ClassAct"
  187.             (run "unlzx -amq x ClassAct.lzx ram:ClassAct/")
  188.             (set @classact-source "RAM:ClassAct")
  189.         )
  190.         (set @classact-source (pathonly @icon))
  191.     )
  192.  
  193.     (if (exists (tackon @classact-source "Classes")) ; The archive contains a ClassAct library update.
  194.     (
  195.         (set comp-dest  (/ (* classact-complete 2) 10))
  196.         (set comp-libs  (/ (* classact-complete 3) 10))
  197.         (set comp-dirs  (/ (* classact-complete 4) 10))
  198.         (set comp-junod (/ (* classact-complete 5) 10))
  199.         (set comp-020   (/ (* classact-complete 6) 10))
  200.         (set comp-gad   (/ (* classact-complete 7) 10))
  201.         (set comp-im    (/ (* classact-complete 8) 10))
  202.         (set comp-prefs (/ (* classact-complete 9) 10))
  203.     
  204.         ; has the user installed ClassAct in CLASSACT: ?
  205.         (set @classact-dest (getassign "CLASSACT" "A"))
  206.         (if (= @classact-dest "") (set @classact-dest "SYS:Classes"))
  207.         
  208.         ; is ClassAct already in SYS:Classes ?
  209.         (if (or (not (exists (tackon @classact-dest "Gadgets/layout.gadget") (noreq)))
  210.                 (= @user-level 2))
  211.             ; no, ask where it should be placed
  212.             (set @classact-dest
  213.                 (askdir
  214.                     (prompt #classdest-prompt)
  215.                     (help #classdest-help)
  216.                     (default @classact-dest)
  217.                     (newpath)
  218.                 )
  219.             )
  220.         )
  221.         
  222.         (complete comp-dest)
  223.         
  224.         (if (<> (run (cat (tackon @classact-source "C/CheckAssign") " LIBS: " @classact-dest)) 0)
  225.             (
  226.                 (message #noclasses-message)
  227.                 (if (not (exists @classact-dest))
  228.                     (makedir @classact-dest (prompt (cat #creating-dir @classact-dest)))
  229.                 )
  230.                 (set @addassign (cat "Assign >NIL: LIBS: " @classact-dest " ADD\n"))
  231.                 (startup "CLASSACT"
  232.                     (command @addassign)
  233.                     (prompt (cat #adding-1 @classact-dest #adding-2))
  234.                     (help #adding-help)
  235.                 )
  236.                 (run (@addassign))
  237.             )
  238.         )
  239.         
  240.         (complete comp-libs)
  241.         
  242.         (set @classact-gadgets (tackon @classact-dest "Gadgets"))
  243.         (set @classact-images (tackon @classact-dest "Images"))
  244.         
  245.         (if (not (exists @classact-gadgets (noreq)))
  246.             (makedir @classact-images
  247.                 (prompt (cat #creating-dir @classact-gadgets))
  248.             )
  249.         )
  250.         
  251.         (if (not (exists @classact-images (noreq)))
  252.             (makedir @classact-images
  253.                 (prompt (cat #creating-dir @classact-images))
  254.             )
  255.         )
  256.         
  257.         (complete comp-dirs)
  258.         
  259.         (if (exists "SYS:Classes/Gadgets/button.gadget")
  260.             (if (and (= 2752514 (getversion "SYS:Classes/Gadgets/button.gadget"))
  261.                     (= 4868 (getsize "SYS:Classes/Gadgets/button.gadget")))
  262.                 (if (askbool (prompt #junod-button) (help @askbool-help) (default 1))
  263.                     (
  264.                         (rename "SYS:Classes/Gadgets/button.gadget" "SYS:Classes/Gadgets/button.gadget.v42")
  265.                         (message #junod-backed)
  266.                     )
  267.                     (message #junod-kept)
  268.                 )
  269.             )
  270.         )
  271.         
  272.         (complete comp-junod)
  273.         
  274.         (if (and (and cpu020 v39) (exists (tackon @classact-source "Classes/Gadgets/layout.gadget.020")))
  275.             (set classes-020 (askbool (prompt #classes-020) (help #help-020) (default 1)))
  276.             (set classes-020 0)
  277.         )
  278.  
  279.         (complete comp-020)
  280.         
  281.         (set @source-path (tackon @classact-source "Classes/Gadgets"))
  282.         (foreach @source-path "#?.gadget"
  283.             (
  284.                 (set thislib (tackon @source-path @each-name))
  285.                 (if (and classes-020 (exists (cat thislib ".020")))
  286.                     (set thislib (cat thislib ".020"))
  287.                 )
  288.                 (copylib (source thislib)
  289.                     (dest @classact-gadgets)
  290.                     (newname @each-name)
  291.                     (prompt (cat #installing @each-name))
  292.                     (help #classdest-help)
  293.                     (optional "force" "askuser")
  294.                 )
  295.             )
  296.         )
  297.         
  298.         (complete comp-gad)
  299.         
  300.         (set @source-path (tackon @classact-source "Classes/Images"))
  301.         (foreach @source-path "#?.image"
  302.             (
  303.                 (set thislib (tackon @source-path @each-name))
  304.                 (if (and classes-020 (exists (cat thislib ".020")))
  305.                     (set thislib (cat thislib ".020"))
  306.                 )
  307.                 (copylib (source thislib)
  308.                     (dest @classact-images)
  309.                     (newname @each-name)
  310.                     (prompt (cat #installing @each-name))
  311.                     (help #classdest-help)
  312.                     (optional "force" "askuser")
  313.                 )
  314.             )
  315.         )
  316.         
  317.         (complete comp-im)
  318.  
  319.         (set @source-path (tackon @classact-source "Classes"))
  320.         (foreach @source-path "#?.class"
  321.             (
  322.                 (set thislib (tackon @source-path @each-name))
  323.                 (if (and classes-020 (exists (cat thislib ".020")))
  324.                     (set thislib (cat thislib ".020"))
  325.                 )
  326.                 (copylib (source thislib)
  327.                     (dest @classact-dest)
  328.                     (newname @each-name)
  329.                     (prompt (cat #installing @each-name))
  330.                     (help #classdest-help)
  331.                     (optional "force" "askuser")
  332.                 )
  333.             )
  334.         )
  335.     )
  336.     )
  337.     (if (exists (tackon @classact-source "Prefs/ClassAct")) ; The archive contains ClassAct prefs tools
  338.     (
  339.         (message #caprefs-message)
  340.         
  341.         (copylib (source (tackon @classact-source "Prefs/CAPrefs")) 
  342.             (dest "C:") 
  343.             (prompt (cat #installing "CAPrefs"))
  344.         )
  345.         (copylib (source (tackon @classact-source "Prefs/ClassAct"))
  346.             (dest "SYS:Prefs")
  347.             (prompt (cat #installing "ClassAct Prefs"))
  348.             (infos)
  349.         )
  350.         
  351.         (complete comp-prefs)
  352.         
  353.         (if (not (exists "ENVARC:ClassAct" (noreq)))
  354.             (
  355.                 (makedir "ENVARC:ClassAct"
  356.                     (prompt (cat #creating-dir "ENVARC:ClassAct"))
  357.                 )
  358.                 (textfile (dest "ENVARC:ClassAct/ClassAct")
  359.                     (append "")
  360.                 )
  361.             )
  362.         )
  363.         (set caprefs-cmd "C:CAPrefs >NIL:\n")
  364.  
  365.         (startup "CAPREFS"
  366.             (prompt (cat #caprefs-startup-1 caprefs-cmd #caprefs-startup-2))
  367.             (help #caprefs-message)
  368.             (command caprefs-cmd)
  369.         )
  370.     )
  371.     )
  372.     
  373.     (if (or (exists "ClassAct.lha") (exists "ClassAct.lzx"))
  374.         (run "C:Delete RAM:ClassAct ALL"
  375.             (prompt #deleting-cltmp)
  376.         )
  377.     )
  378.  
  379.     (complete classact-complete)
  380. )
  381.  
  382. ; ************** END OF CLASSACT INSTALL PROCEDURE. COPY THE BLOCK ABOVE
  383. ; ************** TO YOUR CLASSACT APPLICATION INSTALLER.
  384.  
  385. ;**************************************
  386. ;****** Install filetype icons ********
  387. ;**************************************
  388.  
  389. (procedure P_install-filetypes
  390.     (makedir "Thor:Filetypes" (infos))
  391.  
  392.     (set icon
  393.         (askchoice
  394.             (prompt
  395.                 "Please select what icon set THOR will use internally on MIME attachments.\n"
  396.                 "(we recommand that you select normal icons unless you run more than 8 colours "
  397.                 "on the THOR screen).")
  398.             (help
  399.                 "If you use MagicWB on your Workbench, "
  400.                 "you might want to install the special MagicWB icons.\n\n"
  401.                 "Likewise, if you use NewIcons on your Workbench, "
  402.                 "you might want to install the special NewIcons icons.")
  403.             (choices "Normal icons" "Small MagicWB icons" "MagicWB icons" "NewIcons icons")
  404.             (default 0)
  405.         )
  406.     )
  407.     (if (= icon 0)
  408.         (
  409.             (copyfiles
  410.                 (prompt "Copying Normal filetype icons...")
  411.                 (source "Thor_Install:FiletypesNORMAL")
  412.                 (dest "Thor:filetypes")
  413.                 (pattern "#?")
  414.                 (noposition)
  415.                 (nogauge)
  416.             )
  417.         )
  418.     )
  419.     (if (= icon 1)
  420.         (
  421.             (copyfiles
  422.                 (prompt "Copying small MagicWB filetype icons...")
  423.                 (source "Thor_Install:FiletypesMWBsmall")
  424.                 (dest "Thor:filetypes")
  425.                 (pattern "#?")
  426.                 (noposition)
  427.                 (nogauge)
  428.             )
  429.         )
  430.     )
  431.     (if (= icon 2)
  432.         (
  433.             (copyfiles
  434.                 (prompt "Copying MagicWB filetype icons...")
  435.                 (source "Thor_Install:Filetypes")
  436.                 (dest "Thor:filetypes")
  437.                 (pattern "#?")
  438.                 (noposition)
  439.                 (nogauge)
  440.             )
  441.         )
  442.     )
  443.     (if (= icon 3)
  444.         (
  445.             (copyfiles
  446.                 (prompt "Copying NewIcon filetype icons...")
  447.                 (source "Thor_Install:FiletypesNI")
  448.                 (dest "Thor:filetypes")
  449.                 (pattern "#?")
  450.                 (noposition)
  451.                 (nogauge)
  452.             )
  453.         )
  454.     )
  455.     ;*****************************
  456.     ;*** Set default viewers *****
  457.     ;*****************************
  458.  
  459.     (set picviewer
  460.         (askstring
  461.             (prompt
  462.                 "Please type the name (with full path, if needed) "
  463.                 "of the picture viewer you will use as external viewer of attached "
  464.                 "pictures in Thor. If left blank, Multiview will be used.")
  465.             (help "External picture viewer to be used in Thor.")
  466.             (default "")
  467.         )
  468.     )
  469.     (if (<> picviewer "")
  470.         ( ; Then
  471.             (tooltype 
  472.                 (dest "Thor:Filetypes/def_picture")
  473.                 (setdefaulttool picviewer)
  474.             )
  475.         )
  476.     )
  477.     (set animviewer
  478.         (askstring
  479.             (prompt
  480.                 "Please type the name (with full path, if needed) "
  481.                 "of the animation viewer you will use as external viewer of attached "
  482.                 "animations in Thor. If left blank, Multiview will be used.")
  483.             (help "External animation viewer to be used in Thor.")
  484.             (default "")
  485.         )
  486.     )
  487.     (if (<> animviewer "")
  488.         ( ; Then
  489.             (tooltype 
  490.                 (dest "Thor:Filetypes/def_anim")
  491.                 (setdefaulttool animviewer)
  492.             )
  493.         )
  494.     )
  495.     (set soundplayer
  496.         (askstring
  497.             (prompt
  498.                 "Please type the name (with full path, if needed) "
  499.                 "of the sound player you will use as external player of attached "
  500.                 "sounds in Thor. If left blank, Multiview will be used.")
  501.             (help "External sound player to be used in Thor.")
  502.             (default "")
  503.         )
  504.     )
  505.     (if (<> soundplayer "")
  506.         ( ; Then
  507.             (tooltype 
  508.                 (dest "Thor:Filetypes/def_sound")
  509.                 (setdefaulttool soundplayer)
  510.             )
  511.         )
  512.     )
  513.     (set textviewer
  514.         (askstring
  515.             (prompt
  516.                 "Please type the name (with full path, if needed) "
  517.                 "of the text viewer you will use as external viewer of attached "
  518.                 "text files in Thor. If left blank, Multiview will be used.")
  519.             (help "External text viewer to be used in Thor.")
  520.             (default "")
  521.         )
  522.     )
  523.     (if (<> textviewer "")
  524.         ( ; Then
  525.             (tooltype 
  526.                 (dest "Thor:Filetypes/def_text")
  527.                 (setdefaulttool textviewer)
  528.             )
  529.         )
  530.     )
  531.     (set docviewer
  532.         (askstring
  533.             (prompt
  534.                 "Please type the name (with full path, if needed) "
  535.                 "of the documentation (eg. AmigaGuide ) viewer you will use as external viewer of attached "
  536.                 "documentation files in Thor. If left blank, Multiview will be used.")
  537.             (help "External documentation viewer to be used in Thor.")
  538.             (default "")
  539.         )
  540.     )
  541.     (if (<> docviewer "")
  542.         ( ; Then
  543.             (tooltype 
  544.                 (dest "Thor:Filetypes/def_doc")
  545.                 (setdefaulttool docviewer)
  546.             )
  547.         )
  548.     )
  549. )
  550.  
  551. ; ---------------------------------------------------------------------------
  552.  
  553. (procedure WAITX (set X 1) ( (while (< X 100)  (set X (+ X 1)) )  ) )
  554.  
  555. (working (cat "\n\n\n\n\n\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  556. (working (cat "\n\n\n\n\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  557. (working (cat "\n\n\n\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  558. (working (cat "\n\n\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  559. (working (cat "\n\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  560. (working (cat "\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  561. (working (cat "\n\n\n\n\n\n\n"#version"")) (WAITX)
  562. (working (cat "\n\n\n\n\n\n"#version"")) (WAITX)
  563. (working (cat "\n\n\n\n\n"#version"")) (WAITX)
  564. (working (cat "\n\n\n\n"#version"")) (WAITX)
  565. (working (cat "\n\n\n"#version"")) (WAITX)
  566. (working (cat "\n\n"#version"")) (WAITX)
  567. (working (cat "\n\n"#version"")) (WAITX)
  568. (working (cat "\n"#version"")) (WAITX)
  569. (working (cat "\n"#version"")) (WAITX)
  570.  
  571. (working (cat "\n"#version"\n\n\n\n\n\n\n\n\n\n\n\nby")) (WAITX)
  572. (working (cat "\n"#version"\n\n\n\n\n\n\n\n\n\n\nby")) (WAITX)
  573. (working (cat "\n"#version"\n\n\n\n\n\n\n\n\n\nby")) (WAITX)
  574. (working (cat "\n"#version"\n\n\n\n\n\n\n\n\nby")) (WAITX)
  575. (working (cat "\n"#version"\n\n\n\n\n\n\n\nby")) (WAITX)
  576. (working (cat "\n"#version"\n\n\n\n\n\n\nby")) (WAITX)
  577. (working (cat "\n"#version"\n\n\n\n\n\nby")) (WAITX)
  578. (working (cat "\n"#version"\n\n\n\n\nby")) (WAITX)
  579. (working (cat "\n"#version"\n\n\n\nby")) (WAITX)
  580. (working (cat "\n"#version"\n\n\nby")) (WAITX)
  581. (working (cat "\n"#version"\n\n\nby")) (WAITX)
  582.  
  583. (working (cat "\n"#version"\n\n\nby\n\n\n\n\n\n\n\n\nUltima Thule Software")) (WAITX) 
  584. (working (cat "\n"#version"\n\n\nby\n\n\n\n\n\n\n\nUltima Thule Software")) (WAITX) 
  585. (working (cat "\n"#version"\n\n\nby\n\n\n\n\n\n\nUltima Thule Software")) (WAITX) 
  586. (working (cat "\n"#version"\n\n\nby\n\n\n\n\n\nUltima Thule Software")) (WAITX) 
  587. (working (cat "\n"#version"\n\n\nby\n\n\n\n\nUltima Thule Software")) (WAITX) 
  588. (working (cat "\n"#version"\n\n\nby\n\n\n\nUltima Thule Software")) (WAITX) 
  589. (working (cat "\n"#version"\n\n\nby\n\n\nUltima Thule Software")) (WAITX) 
  590.  
  591. (message (cat "\n\n\n"#version"\n\n\nby\n\n\nUltima Thule Software")) (WAITX) 
  592.  
  593. (welcome)
  594.  
  595. ; first reset the user level so that the novice can see whats going on
  596.     (save_default_level)
  597.     (expert_level)
  598.  
  599. ;Make assign to install from
  600.     (makeassign "Thor_Install" "" (safe))
  601.  
  602.  
  603. ;******************
  604. ;** Check Memory **
  605. ;******************
  606.  
  607. (run "Avail flush")
  608.  
  609. (set Running (run "Thor_Install:CheckForLib"))
  610.  
  611. (while (= Running 20)
  612.       ((Message newline "Thor (or a related program) seems to be running, you MUST close it NOW."    
  613.         newline "If you don't, the installation will fail!")
  614.     (run "Avail flush")
  615.     (set Running (run "Thor_Install:CheckForLib")))
  616. )
  617.  
  618. ;************************
  619. ;** Start Installation **
  620. ;************************
  621.  
  622. (if (exists "ENV:THOR/THORPath" (noreq))
  623.     ; Then
  624.     (
  625.         (if (set Thor_Dir (getenv "THOR/THORPath"))
  626.             (
  627.                 (set Test_lf (substr Thor_Dir (- (strlen Thor_Dir) 1) ) )
  628.                 (if (= Test_lf "\n")
  629.                     (set Thor_Dir (substr Thor_Dir 0 (- (strlen Thor_Dir) 1) ) )
  630.                 )
  631.                 (set Thor_Dir (expandpath Thor_Dir))
  632.                 (makeassign "Thor" Thor_Dir (safe))
  633.             )
  634.             ; Else
  635.             (
  636.                 (if (exists "Thor:libs/bbsread.library" (noreq))
  637.                     (
  638.                         ; Then
  639.                         (    
  640.                             (set Thor_Dir (expandpath "Thor:"))
  641.                         )
  642.                         ; Else
  643.                         (
  644.                             (set end_text "Please use the InstallThor script for a first-time installation.")
  645.                             (abort end_text)
  646.                         )
  647.                     )
  648.                 )
  649.             )
  650.         )
  651.     )
  652.     ; Else
  653.     (
  654.         (if (exists "Thor:libs/bbsread.library" (noreq))
  655.             ; Then
  656.             (    
  657.                 (set Thor_Dir (expandpath "Thor:"))
  658.             )
  659.             ; Else
  660.             (
  661.                 (set end_text "Please use the InstallThor script for a first-time installation.")
  662.                 (abort end_text)
  663.             )
  664.         )
  665.     )
  666. )
  667.  
  668. (if (exists "ENV:THOR/THORPath" (noreq))
  669.     ; Then
  670.     (
  671.         (if (set BBSData_Dir (getenv "THOR/BBSDataPath"))
  672.             (
  673.                 (set BBSData_Dir (substr BBSData_Dir 0 (- (strlen BBSData_Dir) 1)))
  674.                 (set BBSData_Dir (expandpath BBSData_Dir))
  675.                 (makeassign "BBSData" BBSData_Dir (safe))
  676.             )
  677.             ; Else
  678.             (
  679.                 (if (exists "BBSData:global.config" (noreq))
  680.                     ; Then
  681.                     (
  682.                         (set BBSData_Dir (expandpath "BBSData:"))
  683.                     )
  684.                     ; Else
  685.                     (
  686.                         (set end_text "Please use the InstallThor script for a first-time installation.")
  687.                         (abort end_text)
  688.                     )
  689.                 )
  690.             )
  691.         )
  692.     )
  693.     ; Else
  694.     (
  695.         (if (exists "BBSData:global.config" (noreq))
  696.             ; Then
  697.             (
  698.                 (set BBSData_Dir (expandpath "BBSData:"))
  699.             )
  700.             ; Else
  701.             (
  702.                 (set end_text "Please use the InstallThor script for a first-time installation.")
  703.                 (abort end_text)
  704.             )
  705.         )
  706.     )
  707. )
  708.  
  709. ;**********************************************
  710. ;** Move ARexx scripts to another directory..**
  711. ;**********************************************
  712.  
  713. (if (askbool
  714.         (prompt
  715.             "The THOR ARexx script distribution has changed. "
  716.             "The old directory with ARexx scripts can be moved "
  717.             "to a Rexx_Old directory. \n\n"
  718.             "Press 'Yes' to continue with backup of old ARexx scripts.")
  719.         (help
  720.             "The installer has determined that you may already have a " 
  721.             "copy of Thor installed on your system. "
  722.             "ARexx files from a previous installation can be moved to "
  723.             "a safe directory."
  724.         )
  725.         (default 1)
  726.     )
  727.     ; Then
  728.     ( 
  729.         (makedir "THOR:Rexx_Old")
  730.         (copyfiles
  731.             (source "Thor:rexx")
  732.             (dest "THOR:rexx_old")
  733.             (all)
  734.         )
  735.         (working omp "Deleting old ARexx files...")
  736.         (run "Delete THOR:rexx/~(postinglists|#?.cfg|#?.adr) all")
  737.     )
  738. )
  739.  
  740.  
  741. ;**********************************************
  742. ;** See if SortMail.cfg needs to be moved. ****
  743. ;**********************************************
  744.  
  745. (set #move-cfg "\nThe SortMail configuration was found in ENV(ARC):Thor/SortMail.cfg.\n\nAs SortMail 3.3 requires the configuration to be in the system's directory it has now been moved to:\n\n")
  746. (set #old-cfg "\nAn old SortMail configuration was found in ENV(ARC):Thor/SortMail.cfg.\n\nThe format of the configuration files have changed in SortMail 3.0 and higher, so a new configuration will have to be created from scratch using the new CfgSortMail.thor.\n\nWhen you have reconfigured SortMail, please delete ENVARC:Thor/SortMail.cfg.")
  747. (set #chk-fail "\nFailed to run checkver.rexx!\n\nPlease check that SYS:RexxC/rx and SYS:RexxC/WaitForPort exist and make sure you have started SYS:System/RexxMast.")
  748.  
  749. (if (exists "ENV:Thor/SortMail.cfg" (noreq) )
  750.     (
  751.         (set #version (run "SYS:RexxC/rx Thor_Install:checkver.rexx") )
  752.  
  753.         (if (= #version 1)
  754.             (message #old-cfg)
  755.         )
  756.  
  757.         (if (= #version 2)
  758.             (
  759.                 (set #sys-dir (getenv "SM_System") )
  760.                 (set #move-cfg (cat #move-cfg #sys-dir) )
  761.                 (message #move-cfg)
  762.                 (run "Delete ENV:SM_System QUIET")
  763.             )
  764.         )
  765.  
  766.         (if (> #version 2)
  767.             (message #chk-fail)
  768.         )
  769.     )
  770. )
  771.  
  772. ;**********************************************
  773. ;** Hostile deletion of old files here.. ******
  774. ;**********************************************
  775.  
  776. (expert_level)
  777.  
  778. (run "Delete libs:bbsread.library")
  779. (run "Delete libs:bbsreadcnv2.library")
  780. (run "Delete l:bbsread-handler")
  781. (run "Delete l:bbsreadrexx-handler")
  782. (run "Delete THOR:bin/initsoup")
  783. (run "Delete THOR:bin/configuucp")
  784.  
  785. ;******************
  786. ;** Locale stuff **
  787. ;******************
  788.  
  789. (default_level)
  790.  
  791. (set catalog
  792.    (askoptions
  793.       (prompt "What languages would you like to install ?\n"
  794.             "English is the built-in language.")
  795.       (help
  796.             "This will install locale files for other languages than English. "
  797.             "You can set the prefered language on Workbench and in Thor by"
  798.             "using the prefs:locale tool." newline @askchoice-help
  799.       )
  800.       (choices "Norsk" "Dansk" "Svenska" "Deutsch" "Français" "Italiano" "Nederlands" "Català" "Srpski" "Suomi")
  801.       (default 0)
  802.    )
  803. )
  804.  
  805. ; Delete previous installed catalog files.
  806.  
  807. (run "delete thor:catalogs all")
  808.  
  809. (makedir "thor:catalogs")
  810.  
  811. (if (bitand 1 catalog)
  812.     (copyfiles
  813.         (source "Thor_Install:catalogs/norsk")
  814.         (dest "thor:catalogs/norsk")
  815.         (all)
  816.     )
  817. )
  818.  
  819. (if (bitand 2 catalog)
  820.     (copyfiles
  821.         (source "Thor_Install:catalogs/dansk")
  822.         (dest "thor:catalogs/dansk")
  823.         (all)
  824.     )
  825. )
  826.  
  827. (if (bitand 4 catalog)
  828.     (copyfiles
  829.         (source "Thor_Install:catalogs/svenska")
  830.         (dest "thor:catalogs/svenska")
  831.         (all)
  832.     )
  833. )
  834.  
  835. (if (bitand 8 catalog)
  836.     (copyfiles
  837.         (source "Thor_Install:catalogs/deutsch")
  838.         (dest "thor:catalogs/deutsch")
  839.         (all)
  840.     )
  841. )
  842.  
  843. (if (bitand 16 catalog)
  844.     (copyfiles
  845.         (source "Thor_Install:catalogs/français")
  846.         (dest "thor:catalogs/français")
  847.         (all)
  848.     )
  849. )
  850.  
  851. (if (bitand 32 catalog)
  852.     (copyfiles
  853.         (source "Thor_Install:catalogs/italiano")
  854.         (dest "thor:catalogs/italiano")
  855.         (all)
  856.     )
  857. )
  858.  
  859. (if (bitand 64 catalog)
  860.     (copyfiles
  861.         (source "Thor_Install:catalogs/nederlands")
  862.         (dest "thor:catalogs/nederlands")
  863.         (all)
  864.     )
  865. )
  866.  
  867. (if (bitand 128 catalog)
  868.     (copyfiles
  869.         (source "Thor_Install:catalogs/català")
  870.         (dest "thor:catalogs/català")
  871.         (all)
  872.     )
  873. )
  874.  
  875. (if (bitand 256 catalog)
  876.     (copyfiles
  877.         (source "Thor_Install:catalogs/srpski")
  878.         (dest "thor:catalogs/srpski")
  879.         (all)
  880.     )
  881. )
  882.  
  883. (if (bitand 512 catalog)
  884.     (copyfiles
  885.         (source "Thor_Install:catalogs/suomi")
  886.         (dest "thor:catalogs/suomi")
  887.         (all)
  888.     )
  889. )
  890.  
  891. ;***********************************
  892. ;***** GET FIRST DISK IN HERE ******
  893. ;***********************************
  894.  
  895. ; first copy over the stuff
  896. (working omp "Decompressing and copying Thor files.")
  897.  
  898. (run "Thor_Install:lha -a x Thor_Install:thor.lha THOR:" )
  899.  
  900. ;*********************
  901. ;** reqtools.libary **
  902. ;*********************
  903.  
  904. (copylib
  905.     (prompt "Copying ReqTools library")
  906.     (help "This will copy the ReqTools library." newline @copylib-help)
  907.     (source "Thor_Install:reqtools.library")
  908.     (dest "libs:")
  909. )
  910.  
  911. ;************************
  912. ;**  Copy the keyfile  **
  913. ;************************
  914. (if (exists "Thor_Install:THOR.key" (noreq))
  915. ; Then
  916.     (copyfiles
  917.         (source "Thor_Install:THOR.key")
  918.         (dest "THOR:")
  919.     )
  920. )
  921.         
  922. (run "thor:bin/InitCharsets")
  923.  
  924. (expert_level)
  925.  
  926. (set defpath (pathonly @icon))
  927.  
  928. (if (exists "Thor_Install:bin/parseqwk" (noreq))
  929.     ; Then
  930.     (
  931.         (set bbspack 1)
  932.     )
  933.     ; Else
  934.     (
  935.         (if    (askbool
  936.                 (prompt newline 
  937.                                 "Would you like to install the modules for "
  938.                                 "QWK, Fido, Hippo, Bluewave, ABBS/MBBS and Omen "
  939.                                 "to be used with Bulletin Board Systems?\n\n "
  940.                                 "(you will be able to select which modules to "
  941.                                 "install later in this installation procedure).")
  942.                 (help newline
  943.                                 "This section of the installation is dedicated "
  944.                                 "to installation of some common formats "
  945.                                 "required if you want to use THOR with BBSes.\n\n"
  946.                                 "Select YES if you want to continue with this "
  947.                                 "installation, otherwise NO")
  948.                 (default 1)
  949.             )
  950.             ; Then 
  951.             (
  952.                 (set isthere 20)
  953.                 (while (= 20 isthere)
  954.                     (set bbsfile 
  955.                         (askfile
  956.                             (prompt (cat "Please select the BBS archive for "#version"\n"
  957.                                     "(Usually named '"#bbspackname"').\n\n"
  958.                                     "It will be unarchived automatically."))
  959.                             (help @askfile-help)
  960.                             (default (tackon defpath #bbspackname))
  961.                         )
  962.                     )
  963.                     ; verify that the file exists
  964.                     (if (exists bbsfile)
  965.                         (
  966.                             (set isthere 0)
  967.                             (set runfile (cat runfile "Thor_Install:lha -a x " quote bbsfile quote " Thor_Install:"))
  968.                             (set failed (run runfile))
  969.                             (if (<> 0 failed)
  970.                                 (
  971.                                     ((set failed_text "Unarchiving of the BBS archive failed.")
  972.                                         (message end_text))
  973.                                 )
  974.                                 ; Else
  975.                                 (
  976.                                     (set bbspack 1)
  977.                                 )
  978.                             )
  979.                         )
  980.                         ; else
  981.                         (
  982.                             (if    (askbool
  983.                                           (prompt 
  984.                                         "File doesn't exist.\n\nDo you want to try again?"
  985.                                         (default 1)
  986.                                         (help "YES to select the correct file, or NO to continue without installing this archive.")
  987.                                     )
  988.                                 )
  989.                                 ; Then
  990.                                 (
  991.                                     (set isthere 20)
  992.                                 )
  993.                                 ; Else
  994.                                 (
  995.                                     (set isthere 0)
  996.                                 )
  997.                             )
  998.                         )
  999.                     )
  1000.                 )
  1001.             )
  1002.         )
  1003.     )
  1004. )
  1005.  
  1006. (if (exists "Thor_Install:bin/gettcp" (noreq))
  1007.     ; Then
  1008.     (
  1009.         (set inetpack 1)
  1010.     )
  1011.     ; Else
  1012.     (
  1013.         (if    (askbool
  1014.                 (prompt newline 
  1015.                                 "Would you like to install the modules for "
  1016.                                 "UUCP, SOUP, NNTP, SMTP and POP3 "
  1017.                                 "to be used with Internet?\n\n"
  1018.                                 "(you will be able to select which modules to "
  1019.                                 "install later in this installation procedure).")
  1020.                 (help newline
  1021.                                 "This section of the installation is dedicated "
  1022.                                 "to installation of some common formats "
  1023.                                 "required if you want to use THOR with Internet.\n\n"
  1024.                                 "Select YES if you want to continue with this "
  1025.                                 "installation, otherwise NO")
  1026.                 (default 1)
  1027.             )
  1028.             ; Then 
  1029.             (
  1030.                 (set isthere 20)
  1031.                 (while (= 20 isthere)
  1032.                     (set inetfile 
  1033.                         (askfile
  1034.                             (prompt (cat  
  1035.                                     "Please select the Internet archive for "#version"\n"
  1036.                                     "(Usually named '"#inetpackname"').\n\n"
  1037.                                     "It will be unarchived automatically."))
  1038.                             (help @askfile-help)
  1039.                             (default (tackon defpath #inetpackname))
  1040.                         )
  1041.                     )
  1042.                     ; verify that the file exists
  1043.                     (if (exists inetfile)
  1044.                         (
  1045.                             (set isthere 0)
  1046.                             (set runfile2 (cat runfile2 "Thor_Install:lha -a x " quote inetfile quote " Thor_Install:"))
  1047.                             (set failed (run runfile2))
  1048.                             (if (<> 0 failed)
  1049.                                 (
  1050.                                     ((set failed_text "Unarchiving of the Internet archive failed.")
  1051.                                         (message end_text))
  1052.                                 )
  1053.                                 ; Else
  1054.                                 (
  1055.                                     (set inetpack 1)
  1056.                                 )
  1057.                             )
  1058.                         )
  1059.                         ; else
  1060.                         (
  1061.                             (if    (askbool
  1062.                                           (prompt 
  1063.                                         "File doesn't exist.\n\nDo you want to try again?"
  1064.                                         (default 1)
  1065.                                         (help "YES to select the correct file, or NO to continue without installing this archive.")
  1066.                                     )
  1067.                                 )
  1068.                                 ; Then
  1069.                                 (
  1070.                                     (set isthere 20)
  1071.                                 )
  1072.                                 ; Else
  1073.                                 (
  1074.                                     (set isthere 0)
  1075.                                 )
  1076.                             )
  1077.                         )
  1078.                     )
  1079.                 )
  1080.             )
  1081.         )
  1082.     )
  1083. )
  1084.  
  1085. (if (= bbspack 1)
  1086.     (
  1087.         (set bbs_type
  1088.            (askoptions
  1089.               (prompt
  1090.                         "Please select which BBS modules "
  1091.                         "you want to install.")
  1092.               (help
  1093.                     "What system type for BBS usage that should be "
  1094.                     "installed can be selected here."
  1095.               )
  1096.  
  1097.               (choices
  1098.                     "QWK        - Normal QWK"
  1099.                     "Fido       - Normal Fidonet"
  1100.                     "BlueWave   - Normal BlueWave"
  1101.                     "ABBS       - Normal ABBS"
  1102.                     "ABBS_QWK   - ABBS with QWK support"
  1103.                     "MBBS       - Normal MBBS"
  1104.                     "Hippo/BBBS - Normal Hippo V2 and Hippo on BBBS"
  1105.                     "Omen       - Normal Omen"
  1106.               )
  1107.               (default -1)
  1108.            )
  1109.         )
  1110.         (copyfiles
  1111.             (source "Thor_Install:scripts")
  1112.             (dest "THOR:scripts")
  1113.             (pattern "#?BBS#?")
  1114.         )
  1115.         (if (bitand 1 bbs_type)
  1116.             (
  1117.                 (copyfiles
  1118.                     (source "Thor_Install:bin")
  1119.                     (dest "THOR:bin")
  1120.                     (pattern "#?QWK")
  1121.                 )
  1122.                 (copyfiles
  1123.                     (source "Thor_Install:s/cfgqwk")
  1124.                     (dest "THOR:s")
  1125.                 )
  1126.                 (execute "thor:s/cfgqwk")
  1127.             )
  1128.         )
  1129.         (if (bitand 2 bbs_type)
  1130.             (
  1131.                 (copyfiles
  1132.                     (source "Thor_Install:bin")
  1133.                     (dest "THOR:bin")
  1134.                     (pattern "#?FIDO")
  1135.                 )
  1136.                 (copyfiles
  1137.                     (source "Thor_Install:s")
  1138.                     (dest "THOR:s")
  1139.                     (pattern "cfgfido#?")
  1140.                 )
  1141.                 (execute "thor:s/cfgfido")
  1142.                 (execute "thor:s/cfgfido_export")
  1143.             )
  1144.         )
  1145.         (if (bitand 4 bbs_type)
  1146.             (
  1147.                 (copyfiles
  1148.                     (source "Thor_Install:bin")
  1149.                     (dest "THOR:bin")
  1150.                     (pattern "#?BLUE")
  1151.                 )
  1152.                 (copyfiles
  1153.                     (source "Thor_Install:s/cfgblue")
  1154.                     (dest "THOR:s")
  1155.                 )
  1156.                 (execute "thor:s/cfgblue")
  1157.             )
  1158.         )
  1159.         (if (bitand 8 bbs_type)
  1160.             (
  1161.                 (copyfiles
  1162.                     (source "Thor_Install:bin/packambbs")
  1163.                     (dest "THOR:bin")
  1164.                 )
  1165.                 (copyfiles
  1166.                     (source "Thor_Install:bin/parsemsg")
  1167.                     (dest "THOR:bin")
  1168.                 )
  1169.                 (copyfiles
  1170.                     (source "Thor_Install:s/cfgabbs")
  1171.                     (dest "THOR:s")
  1172.                 )
  1173.                 (execute "thor:s/cfgabbs")
  1174.             )
  1175.         )
  1176.         (if (bitand 16 bbs_type)
  1177.             (
  1178.                 (copyfiles
  1179.                     (source "Thor_Install:bin")
  1180.                     (dest "THOR:bin")
  1181.                     (pattern "#?QWK")
  1182.                 )
  1183.                 (copyfiles
  1184.                     (source "Thor_Install:s/cfgabbs_qwk")
  1185.                     (dest "THOR:s")
  1186.                 )
  1187.                 (execute "thor:s/cfgabbs_qwk")
  1188.             )
  1189.         )
  1190.         (if (bitand 32 bbs_type)
  1191.             (
  1192.                 (copyfiles
  1193.                     (source "Thor_Install:bin/packambbs")
  1194.                     (dest "THOR:bin")
  1195.                 )
  1196.                 (copyfiles
  1197.                     (source "Thor_Install:bin/parsemsg")
  1198.                     (dest "THOR:bin")
  1199.                 )
  1200.                 (copyfiles
  1201.                     (source "Thor_Install:s/cfgmbbs")
  1202.                     (dest "THOR:s")
  1203.                 )
  1204.                 (execute "thor:s/cfgmbbs")
  1205.             )
  1206.         )
  1207.         (if (bitand 64 bbs_type)
  1208.             (
  1209.                 (copyfiles
  1210.                     (source "Thor_Install:bin")
  1211.                     (dest "THOR:bin")
  1212.                     (pattern "#?hippo")
  1213.                 )
  1214.                 (copyfiles
  1215.                     (source "Thor_Install:s/cfghippo")
  1216.                     (dest "THOR:s")
  1217.                 )
  1218.                 (copyfiles
  1219.                     (source "Thor_Install:s/cfgbbbs")
  1220.                     (dest "THOR:s")
  1221.                 )
  1222.                 (execute "thor:s/cfghippo")
  1223.                 (execute "thor:s/cfgbbbs")
  1224.             )
  1225.         )
  1226.         (if (bitand 128 bbs_type)
  1227.             (
  1228.                 (copyfiles
  1229.                     (source "Thor_Install:bin")
  1230.                     (dest "THOR:bin")
  1231.                     (pattern "#?omen")
  1232.                 )
  1233.                 (copyfiles
  1234.                     (source "Thor_Install:s/cfgomen")
  1235.                     (dest "THOR:s")
  1236.                 )
  1237.                 (execute "thor:s/cfgomen")
  1238.             )
  1239.         )
  1240.     )
  1241. )
  1242.  
  1243. (if (= inetpack 1)
  1244.     (
  1245.         (set bbs_type
  1246.            (askoptions
  1247.               (prompt
  1248.                         "Please select which Internet modules "
  1249.                         "you want to install.")
  1250.               (help
  1251.                     "What system type for Internet usage that should be "
  1252.                     "installed can be selected here."
  1253.               )
  1254.  
  1255.               (choices
  1256.                         "TCP/TCP_ONLINE - POP3, SMTP and NNTP"
  1257.                         "SOUP/UQWK_SOUP - Normal SOUP and SOUP w/uqwk"
  1258.                         "UUCP           - Normal UUCP"
  1259.               )
  1260.               (default -1)
  1261.            )
  1262.         )
  1263.  
  1264.         (copyfiles
  1265.             (source "Thor_Install:libs/utnet.library")
  1266.             (dest "THOR:libs")
  1267.         )
  1268.  
  1269.         (copyfiles
  1270.             (source "Thor_Install:bin/InitRFC")
  1271.             (dest "THOR:bin")
  1272.         )
  1273.  
  1274.         (copyfiles
  1275.             (source "Thor_Install:scripts")
  1276.             (dest "THOR:scripts")
  1277.             (pattern "#?UQWK#?")
  1278.         )
  1279.  
  1280.         (if (bitand 1 bbs_type)
  1281.             (
  1282.                 (copyfiles
  1283.                     (source "Thor_Install:bin")
  1284.                     (dest "THOR:bin")
  1285.                     (pattern "#?(UUCP|TCP)")
  1286.                 )
  1287.                 (copyfiles
  1288.                     (source "Thor_Install:")
  1289.                     (dest "THOR:")
  1290.                     (pattern "ConnectTHOR#?")
  1291.                 )
  1292.                 (copyfiles
  1293.                     (source "Thor_Install:s/cfgtcp")
  1294.                     (dest "THOR:s")
  1295.                 )
  1296.                 (copyfiles
  1297.                     (source "Thor_Install:s/cfgtcp_online")
  1298.                     (dest "THOR:s")
  1299.                 )
  1300.                 (execute "thor:s/cfgtcp")
  1301.                 (execute "thor:s/cfgtcp_online")
  1302.                 (set tcptype 1)
  1303.             )
  1304.         )
  1305.         (if (bitand 2 bbs_type)
  1306.             (
  1307.                 (copyfiles
  1308.                     (source "Thor_Install:bin")
  1309.                     (dest "THOR:bin")
  1310.                     (pattern "#?SOUP")
  1311.                 )
  1312.                 (copyfiles
  1313.                     (source "Thor_Install:s")
  1314.                     (dest "THOR:s")
  1315.                     (pattern "#?soup")
  1316.                 )
  1317.                 (makedir "THOR:unix")
  1318.                 (copyfiles
  1319.                     (source "Thor_Install:unix")
  1320.                     (dest "THOR:unix")
  1321.                     (all)
  1322.                 )
  1323.                 (execute "thor:s/cfguqwk_soup")
  1324.                 (execute "thor:s/cfgsoup")
  1325.             )
  1326.         )
  1327.         (if (bitand 4 bbs_type)
  1328.             (
  1329.                 (copyfiles
  1330.                     (source "Thor_Install:bin")
  1331.                     (dest "THOR:bin")
  1332.                     (pattern "#?UUCP")
  1333.                 )
  1334.                 (copyfiles
  1335.                     (source "Thor_Install:s/cfguucp")
  1336.                     (dest "THOR:s")
  1337.                 )
  1338.                 (execute "thor:s/cfguucp")
  1339.                 (set uucptype 1)
  1340.             )
  1341.         )
  1342.     )
  1343. )
  1344.  
  1345. ;****************************************************************************************
  1346. ;****** Copy the arexx scripts + docs that were located in the separate archives ********
  1347. ;****************************************************************************************
  1348.  
  1349. (copyfiles
  1350.     (source "Thor_Install:rexx")
  1351.     (dest "THOR:rexx")
  1352.     (all)
  1353. )
  1354. (copyfiles
  1355.     (source "Thor_Install:docs")
  1356.     (dest "THOR:docs")
  1357.     (all)
  1358. )
  1359.  
  1360. (if    (askbool
  1361.         (prompt newline 
  1362.                         "Would you like to install the optional ARexx "
  1363.                         "scripts for THOR? "
  1364.         (help newline
  1365.                         "This section of the installation is dedicated "
  1366.                         "to installation of some optional ARexx scripts.\n\n "
  1367.                         "Select YES if you want to continue with this "
  1368.                         "installation, otherwise NO"))
  1369.         (default 1)
  1370.     )
  1371.     ; Then 
  1372.     (
  1373.         (set isthere 20)
  1374.         (while (= 20 isthere)
  1375.             (set arexxfile 
  1376.                 (askfile
  1377.                     (prompt (cat  
  1378.                             "Please select the ARexx archive for "#version"\n"
  1379.                             "(Usually named '"#arexxpackname"').\n\n"
  1380.                             "It will be unarchived automatically."))
  1381.                     (help @askfile-help)
  1382.                     (default (tackon defpath #arexxpackname))
  1383.                 )
  1384.             )
  1385.             ; verify that the file exists
  1386.             (if (exists arexxfile)
  1387.                 (
  1388.                     (set isthere 0)
  1389.                     (set defpath (pathonly arexxfile))
  1390.                     (set runfile3 (cat runfile3 "Thor_Install:lha -a x " quote arexxfile quote " Thor:rexx/"))
  1391.                     (set failed (run runfile3))
  1392.                     (if (<> 0 failed)
  1393.                         (
  1394.                             ((set failed_text "Unarchiving of the ARexx archive failed.")
  1395.                                 (message end_text))
  1396.                         )
  1397.                     )
  1398.                 )
  1399.                 ; else
  1400.                 (
  1401.                     (if    (askbool
  1402.                                (prompt 
  1403.                                 "File doesn't exist.\n\nDo you want to try again?"
  1404.                                 (default 1)
  1405.                                 (help "YES to select the correct file, or NO to continue without installing this archive.")
  1406.                             )
  1407.                         )
  1408.                         ; Then
  1409.                         (
  1410.                             (set isthere 20)
  1411.                         )
  1412.                         ; Else
  1413.                         (
  1414.                             (set isthere 0)
  1415.                         )
  1416.                     )
  1417.                 )
  1418.             )
  1419.         )
  1420.     )
  1421. )
  1422.  
  1423. (if    (askbool
  1424.         (prompt newline 
  1425.                         "Would you like to install the additional documentation "
  1426.                         "formats for THOR? The available extra formats are "
  1427.                         "PDF (Portable Document Format), Postscript, DVI and HTML."
  1428.         (help newline
  1429.                         "This section of the installation is dedicated "
  1430.                         "to installation of some additional documentation formats.\n\n "
  1431.                         "Select YES if you want to continue with this "
  1432.                         "installation, otherwise NO"))
  1433.         (default 1)
  1434.     )
  1435.     ; Then 
  1436.     (
  1437.         (set isthere 20)
  1438.         (while (= 20 isthere)
  1439.             (set docsfile 
  1440.                 (askfile
  1441.                     (prompt (cat  
  1442.                             "Please select the docs archive for "#version"\n"
  1443.                             "(Usually named '"#docspackname"').\n\n"
  1444.                             "It will be unarchived automatically."))
  1445.                     (help @askfile-help)
  1446.                     (default (tackon defpath #docspackname))
  1447.                 )
  1448.             )
  1449.             ; verify that the file exists
  1450.             (if (exists docsfile)
  1451.                 (
  1452.                     (set isthere 0)
  1453.                     (set defpath (pathonly docsfile))
  1454.                     (set runfile3 (cat runfile3 "Thor_Install:lha -a x " quote docsfile quote " Thor:Docs/"))
  1455.                     (set failed (run runfile3))
  1456.                     (if (<> 0 failed)
  1457.                         (
  1458.                             ((set failed_text "Unarchiving of the docs archive failed.")
  1459.                                 (message end_text))
  1460.                         )
  1461.                     )
  1462.                 )
  1463.                 ; else
  1464.                 (
  1465.                     (if    (askbool
  1466.                                (prompt 
  1467.                                 "File doesn't exist.\n\nDo you want to try again?"
  1468.                                 (default 1)
  1469.                                 (help "YES to select the correct file, or NO to continue without installing this archive.")
  1470.                             )
  1471.                         )
  1472.                         ; Then
  1473.                         (
  1474.                             (set isthere 20)
  1475.                         )
  1476.                         ; Else
  1477.                         (
  1478.                             (set isthere 0)
  1479.                         )
  1480.                     )
  1481.                 )
  1482.             )
  1483.         )
  1484.     )
  1485. )
  1486.  
  1487. (install-classact)
  1488.  
  1489. (if (not (exists "Thor:Filetypes" (noreq)))
  1490.     (P_install-filetypes)
  1491. )
  1492.  
  1493. ;*****************************
  1494. ;******* CONVERT FLAGS *******
  1495. ;*****************************
  1496.  
  1497. (working omp "Updating flags for conferences.")
  1498.  
  1499. (run "thor:bin/convflags")
  1500.  
  1501. ;*****************************
  1502. ;***** WE ARE ALMOST DONE ****
  1503. ;*****************************
  1504.  
  1505. (if (> (exists ("sys:Utilities/more")) 0) (set #mcmd  "sys:Utilities/more") )
  1506. (if (> (exists ("c:multiview")) 0) (set #mcmd "c:multiview") )
  1507. (if (> (exists ("sys:Utilities/multiview")) 0) (set #mcmd  "sys:Utilities/multiview") )
  1508.  
  1509. (run (cat "run " #mcmd " THOR.readme") )
  1510.  
  1511. ; make sure that default-dir is pointing to the right place
  1512. (set @default-dest Thor_Dir)
  1513.     
  1514. (makeassign "Thor_Install")
  1515. (makeassign "BBSData")
  1516. (makeassign "Thor_Disk" (safe))
  1517.  
  1518. ; now for the exit
  1519.     (exit #endtext)
  1520.  
  1521.